<?php include load_tpl('header');?>
<p id="breadcrumbs">
    <a href="/">首页</a> <b>»</b> 
    <span>添加品牌</span>
</p>

<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('./images/shipping.png');">品牌添加</h1>
  </div>
  <div class="content">
  <?php 
	  if(isset($error)){
		echo "<ul class='error'>";
		foreach($messages as $msg){
			echo "<li>".$msg."</li>";
		}
		echo "</ul>";
	  }
  ?>
    <form id="form" enctype="multipart/form-data" method="post" action="">
      <table class="form">
        <tbody>
		<tr>
          <td align="left"><span class="required">*</span>品牌名称:</td>
          <td align="left"><input size="60" value="<?php if(isset($brand['name'])) echo $brand['name'];?>" name="name" type="text">
          </td>
        </tr>
        <tr>
          <td align="left">品牌图片:</td>
          <td align="left">
		  <?php if(isset($brand['image'])){?>
		  <img src="uploads/<?php echo $brand['image'];?>"/><br/>
		  <?php
		  }
		  ?>
		  <input type="file" id="image" value="" name="image"/>
           </td>
        </tr>
        <tr>
          <td align="left">排序权重:</td>
          <td align="left"><input value="<?php if(isset($brand['sort_order'])) echo $brand['sort_order'];?>" name="sort_order" type="text"></td>
        </tr>
		<tr>
		<td align="right"> <a class="button" onclick="$('#form').submit();"><span>保存</span></a></td><td align="left"><a class="button" onclick="location='index.php?mod=brand&act=list'"><span>取消</span></a>
		</td>
		</tr>
      </tbody>
	  </table>
    </form>
  </div>
</div>

<?php include load_tpl('footer');?>
<script type="text/javascript">
</script>